package shootplane;

/**
 * 子弹类：继承FlyObject 类型
 */
public class Bullet extends FlyObject {
    private int bulletType;

    public Bullet(int x, int y) {
        // x、y是根据英雄机的位置动态传入的值
        image = ShootGame.bulletImg;
        width = image.getWidth();
        height = image.getHeight();
        speed = 3;
        this.x = x;
        this.y = y;
    }

    @Override
    public void move() {
        setY(getY() - getSpeed() * 3);
    }

    public int getBulletType() {
        return bulletType;
    }

    public void setBulletType(int bulletType) {
        this.bulletType = bulletType;
    }

}

